<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>022-箭头函数中的this.html</title>
</head>
<body>
	
</body>
<script type="text/javascript">

	
	// function Timer(id){
	// 	this.id = id
	// 	setTimeout(function(){
	// 		console.log(this,this.id)
	// 	},100)
	// }
	// var id = 33
	// const t = new Timer(66)
	


	    function Timer(id){
        this.id = id;    
        setTimeout(()=>{
            console.log(this,this.id);//Timer {id: 100} 100
        },100); 
    }   
    var id = 99;
    let t = new Timer(100);
</script>
</html>